Zabbix Monitoring Scheme Official Latest Version 4.4 [Recommended]
- 2021-07-03 01:06:45
- OfStack
Zabbix
2019/10/12 Chenxin
Reference
https://www.zabbix.com/documentation/4.0/zh/manual
https://baike.baidu.com/item/zabbix/6780368?fr=aladdin
Brief introduction
zabbix is an enterprise-class open source solution that provides distributed system monitoring and network monitoring functions based on WEB interface.
zabbix can monitor various network parameters to ensure the safe operation of the server system; And provides a flexible notification mechanism to allow system administrators to quickly locate/resolve various existing problems.
zabbix consists of two parts, zabbix server and optional component zabbix agent.
zabbix server can provide remote server/network status monitoring, data collection and other functions through SNMP, zabbix agent, ping, port monitoring and other methods, and can run on Linux, Solaris, HP-UX, AIX, Free BSD, Open BSD, OS X and other platforms.
Similar products include Grafana, Nagios, Ganglia, Open-Falcon and so on.
Server Installation and Deployment
Refer to https://www.zabbix.com/download? zabbix=4. 4 & os_distribution=centos & os_version=8 & db=mysql Installation Connection Description
The latest version of Zabbix-4. 4 installed here.
Description of this experimental address
Server: 192.168.143.130
Agent: 192.168.143.130,131
STEP 1 Choose a platform
Select zabbix version/operating system category/operating system version/database category, etc.
Then, different installation instructions will be given according to different user choices. Here, take Zabbix4.4, Centos7 and mysql databases as examples.
2. Install according to the above choices
a. Install the Zabbix source
rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm # Loading zabbix Source of
yum clean all
ls /etc/yum.repos.d/
... zabbix.repo # This file is extra
b. Install Zabbix, server, frontend, agent
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent (zabbix Component , Due to the network speed problem, , It may need to be executed more than once )
Error 1. Delta RPMs disabled because/usr/bin/applydeltarpm not installed.
Explain that deltarpm is not installed, so check the package information
yum provides '*/applydeltarpm' # View the location of dependent packages , The tips are as follows
deltarpm-3.6-3.el7.x86_64 : Create deltas between rpms # Prompt for packages to be installed deltarpm-3.6-3.el7.x86_64
Repo : @base
Matched from:
Filename : /usr/bin/applydeltarpm
Execute the installation command
yum -y install deltarpm #安装命令
If it is still the same, it means that it is caused by network problems (the network speed is too slow), so try it many times (the progress will increase every time you download it. Enter cache)
c. Initializing database and importing table structure
Initialize the database (mysql version 5.7)
create database zabbix character set utf8 collate utf8_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'sj...sg';
CREATE USER 'zabbix'@'%' IDENTIFIED BY 'sj...sg';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'%';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@localhost;
Import data structure
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
d. Modify the DB configuration file for zabbix server
vim /etc/zabbix/zabbix_server.conf
DBHost=192.168.143.130
DBPassword=xxx
DBPort=10306
DBSocket=/tmp/mysql.sock
e. Modify the PHP configuration file for the zabbix server front end
vim /etc/httpd/conf.d/zabbix.conf, Uncomment , And set the correct time zone (Asia/Shanghai)
php_value date.timezone Europe/Riga
f. Start the Zabbix server and the Agent proxy process. Set the boot to start.
Startup service
# systemctl restart zabbix-server zabbix-agent httpd
The actual call is
/usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
/usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
/usr/sbin/httpd
Set boot self-startup
# systemctl enable zabbix-server zabbix-agent httpd
Process open port description
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent (zabbix Component , Due to the network speed problem, , It may need to be executed more than once )
0
After the above steps, zabbix runs.
Configure the Zabbix Front End (Front End Entry Configuration)
http://192.168.143.130/zabbix
For configuration, please refer to the screen capture instructions on front-end configuration in https://www. zabbix. com/documentation/4. 4/manual/installation/install # installing_frontend link.
Or follow the following process (similar to official website 1).
Process description
1. Go to the welcome page
2. Confirm that all relevant plug-ins have been installed. If there are any incomplete plug-ins, you can install them manually.
3. Enter the DB configuration interface and enter IP, PORT, dbname, username and password of Zabbix database.
4. Enter information about zabbix server (hostname/IP, open port 10051, Name can be empty).
After completion, the page prompts as follows
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent (zabbix Component , Due to the network speed problem, , It may need to be executed more than once )
1
First landing
Log in to zabbix web for the first time, account Admin (note that "A" is capitalized), and password zabbix.
Using Zabbix
https://www.zabbix.com/documentation/4.4/manual/quickstart/login
There are also video tutorials.
Mainly monitoring the viewing of items.
Creation of DashBoard.
Addition of clients.
After the client is shut down, "monitor"- > "Instrument"/"Problem" all have instructions showing abnormality (a host is down).
Use of templates (association, new)
Alarm use.
Creation of an Zabbix Client (agent) Separate Installation/Host
Monitor host IP: 192.168. 143.131
1 Install Agent Agent
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent (zabbix Component , Due to the network speed problem, , It may need to be executed more than once )
2
2. Modify the configuration file
cat zabbix_agentd.conf |grep -v -E "(^#|^$)"
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=127.0.0.1 # Modify to 192.168.143.130
ServerActive=127.0.0.1 # Modify to 192.168.143.130
Hostname=Zabbix server # You can change it to another name here
Include=/etc/zabbix/zabbix_agentd.d/*.conf
3. Configure the host on zabbix-web
Select "Configure"- > "Host"- > "Create a host". Then
Select the Host column and enter the host name, group (built in advance), host IP, and port
Select the Template column and select the corresponding template (monitoring item).
Click "Add".
Then go to "monitoring"- > "Latest data" to see if the data acquisition is normal.
Description of Zabbix Related Directories and Files
1. Description of important catalogues
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent (zabbix Component , Due to the network speed problem, , It may need to be executed more than once )
4
2. Other relevant directories (lib, man, doc are omitted)
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-agent (zabbix Component , Due to the network speed problem, , It may need to be executed more than once )
5
User management
Support the management of local users and groups.
Support LDAP, the specific configuration is omitted.
Alarm
Support Mail/GSM-modem (Hardware Connection Server) mode.
Other notes
Monitoring page console supports Chinese.
Support page theme change.
Summarize